package com.njupt.yanglonglong.report.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njupt.yanglonglong.report.demo.dto.StudentGradeDto;
import com.njupt.yanglonglong.report.demo.dto.StudentsGradeDto;
import com.njupt.yanglonglong.report.demo.entity.Report;
import com.njupt.yanglonglong.report.demo.entity.ScoreVO;
import com.njupt.yanglonglong.report.demo.vo.ReportVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Entity com.njupt.yanglonglong.report.demo.entity.Report
 */
@Repository
public interface ReportMapper extends BaseMapper<Report> {
    /**
     * 教师获取已提交的报告
     *
     * @param experimentId
     * @return
     */
    List<ReportVO> getCommittedReportListByExperId(String experimentId);

    List<ReportVO> getReportListByExperId(String experimentId);

    List<StudentsGradeDto> queryGradeByTeacherCourseId(@Param("teacherId") String teacherId, @Param("courseId") String courseId);

    List<StudentGradeDto> queryStudentGradeByStuIdAndCourseId(@Param("studentId") String studentId, @Param("courseId") String courseId);

    void stuUpdateReportFile(Report report);

    List<Report> getReportByStuIdAndCourseId(String stuId, String courseId);

    List<ScoreVO> getReportScoreByStuIdAndCourseId(String stuId, String courseId);
}
